/*
 *  msw/windowImp.h
 *  mini
 *
 *  Created by jin on 1/1/11.
 *  Copyright 2011 cs. All rights reserved.
 *
 */

#ifndef INCLUDED_MSW_WINDOW_IMP_H
#define INCLUDED_MSW_WINDOW_IMP_H

#include <windows.h>
#include <windowImpBase.h>
#include <map>

class Graphic2D;

class MSWWindowImp : public WindowImpBase
{
public:
    MSWWindowImp(Window* owner_);
    virtual ~MSWWindowImp();

    virtual void* GetHandle();
    virtual void Show(bool show);

    void OnPaint(Graphic2D& gc);
protected:
    static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
    static ATOM RegisterWindowClass();

    typedef std::map<HWND, Window*> WindowMap;
    static WindowMap s_map;

    HWND hwd;
};
#endif //INCLUDED_WINDOW_H
